]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
7 years agoshell: Make screenshot API stream based
Carlos Garnacho [Tue, 5 Nov 2019 23:46:41 +0000 (00:46 +0100)]
shell: Make screenshot API stream based

Instead of dealing with filenames, make the low-level API use streams
so the target remains generic.

This so far means JS code now determines the appropriate filename to
use for storing the screenshot, but will be used in other ways in
future commits.

https://gitlab.gnome.org/GNOME/mutter/issues/789
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/810

7 years agost: Add StClipboard method to set arbitrary clipboard content
Carlos Garnacho [Tue, 5 Nov 2019 23:40:17 +0000 (00:40 +0100)]
st: Add StClipboard method to set arbitrary clipboard content

This complements the current text-based API.

https://gitlab.gnome.org/GNOME/mutter/issues/789
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/810

7 years agoshell: Remove format_date() utility function
Florian Müllner [Tue, 10 Sep 2019 03:12:14 +0000 (05:12 +0200)]
shell: Remove format_date() utility function

It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807

7 years agoenvironment: Reimplement Date.toLocaleFormat() override
Florian Müllner [Tue, 10 Sep 2019 03:10:01 +0000 (05:10 +0200)]
environment: Reimplement Date.toLocaleFormat() override

Now that we no longer go through GTimeVal to convert from Date to
GDateTime, there is no more reason for using a C helper function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807

7 years agoenvironment: Stop adding child_set() to layout managers
Florian Müllner [Tue, 5 Nov 2019 23:08:04 +0000 (00:08 +0100)]
environment: Stop adding child_set() to layout managers

We no longer use any layout managers that use custom child properties
instead of the generic Clutter.Actor properties, so this override
is completely unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agoenvironment: Stop monkey-patching Clutter.TableLayout
Florian Müllner [Tue, 5 Nov 2019 23:05:38 +0000 (00:05 +0100)]
environment: Stop monkey-patching Clutter.TableLayout

It's not used for anything anymore, and may well end up being removed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocleanup: Use non-deprecated key symbols
Florian Müllner [Tue, 5 Nov 2019 19:37:28 +0000 (20:37 +0100)]
cleanup: Use non-deprecated key symbols

Clutter originally cluttered its namespace with key symbols, before
prefixing all symbols with KEY. We still use the unprefixed symbols
occasionally, replace them so mutter can drop the deprecated symbols.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocleanup: Replace deprecated lower/raise calls
Florian Müllner [Tue, 5 Nov 2019 19:17:19 +0000 (20:17 +0100)]
cleanup: Replace deprecated lower/raise calls

Those methods have been deprecated for a long time, so
move to the drop-in replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agowindowManager: Stop using Clutter.Actor.prototype.reparent()
Florian Müllner [Tue, 5 Nov 2019 18:35:41 +0000 (19:35 +0100)]
windowManager: Stop using Clutter.Actor.prototype.reparent()

It has been deprecated for ages, and is about to be dropped from mutter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocalendar: Use Clutter.GridLayout
Florian Müllner [Fri, 20 Jun 2014 14:23:32 +0000 (16:23 +0200)]
calendar: Use Clutter.GridLayout

Clutter.TableLayout has been deprecated, so move to the recommended
replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agopolkitAgent: Use a timeout for resetting the dialog
Jonas Dreßler [Sun, 23 Jun 2019 14:32:29 +0000 (16:32 +0200)]
polkitAgent: Use a timeout for resetting the dialog

Since polkit takes a few milliseconds from initiating the session to
emitting the "request" signal, don't introduce visual distraction by
hiding the password entry and showing it again a few ms later.

So start a timeout of 200 ms when we destroy a session and if no session
request (i.e. a request for a password-authentication) happened during
this timeout, hide the password entry.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Reset dialog to defaults after cancelling polkit session
Jonas Dreßler [Sun, 23 Jun 2019 14:33:20 +0000 (16:33 +0200)]
polkitAgent: Reset dialog to defaults after cancelling polkit session

Since we don't know if polkit/PAM will request a password (emitting the
"request" signal) or use another authentication method like a
fingerprint after the current authentication failed, hide the password
field and make the "Authenticate" button insensitive after cancelling
the session, just like we do when creating the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Make authenticate button insensitive if password is empty
Jonas Dreßler [Mon, 24 Jun 2019 10:36:47 +0000 (12:36 +0200)]
polkitAgent: Make authenticate button insensitive if password is empty

According to the mockups, make the polkit dialogs "Authenticate" button
insensitive and don't respond to pressing the enter key if no password
is supplied.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Only set key focus to password entry after opening dialog
Jonas Dreßler [Mon, 24 Jun 2019 08:57:24 +0000 (10:57 +0200)]
polkitAgent: Only set key focus to password entry after opening dialog

Set the key focus to the password field only after we got a request
(and therefore know that a password is requested) instead of using
`setInitialKeyFocus()`. This way we don't try to focus the password
field by default if we aren't showing it (e.g. in case the user has no
password or is using fingerprint login).

Also we have to move the call to `grab_key_focus()` to happen after
`_ensureOpen()`, because otherwise the ModalDialog will set the focus to
one of the buttons while opening itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Also show user avatar for root user
Jonas Dreßler [Sun, 23 Jun 2019 10:15:12 +0000 (12:15 +0200)]
polkitAgent: Also show user avatar for root user

Show the user avatar for all users, including the root user. The root
user will always have the generic avatar, but it looks more consistent
than showing no avatar at all.

This way we also don't have to worry about the spacing introduced by the
polkit-dialog-user-layout CSS class, which would give the
"Administrator" label a small offset to the left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Update user name on user changes
Jonas Dreßler [Sun, 23 Jun 2019 09:52:54 +0000 (11:52 +0200)]
polkitAgent: Update user name on user changes

Right now we only update the user avatar on the user-changed signal, but
since we also display the users real name we should also update that if
the user changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Fix a typo of a signal name
Jonas Dreßler [Sun, 23 Jun 2019 09:40:42 +0000 (11:40 +0200)]
polkitAgent: Fix a typo of a signal name

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 5 Nov 2019 14:38:42 +0000 (15:38 +0100)]
Updated Spanish translation

7 years agosystem: Replace action icons with regular menu items
Florian Müllner [Tue, 15 Oct 2019 18:51:33 +0000 (20:51 +0200)]
system: Replace action icons with regular menu items

Besides making the menu a bit less special, it allows us to fit both
shutdown and suspend actions without any hidden alt-key Easter eggs.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/270

7 years agoaltTab: Use correct actor in label height computation
Florian Müllner [Tue, 5 Nov 2019 01:36:38 +0000 (02:36 +0100)]
altTab: Use correct actor in label height computation

Commit f2bd39b20 removed an intermediate bin, and now we use the
thumbnail bin instead of the label actor to compute the label
height, whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/804

7 years agost: Track stylesheet changes on the StThemeContext
Carlos Garnacho [Thu, 24 Oct 2019 12:03:12 +0000 (14:03 +0200)]
st: Track stylesheet changes on the StThemeContext

Instead of every individual StThemeNode. There are essentially two kinds
of theme nodes: Those we create for lookups, and those interned by the
theme context and used by StWidgets. Listening to the signal on the former
is pointless as they are short lived and not meant to be really used for
drawing. So it is only essential to track stylesheet changes in those we
intern for later use.

This change does precisely that, it lets the StThemeContext track the
stylesheet changes and let all known theme nodes reset their state for
it.

The internal array holding all connected handlers for this signal in glib
was about the biggest single allocation made in gnome-shell, as interned
theme nodes nodes are around the 4 to 5 digit numbers. This essentially
makes it disappear.

This however means that widgets that are explicitly set a theme through
st_widget_set_theme() don't get their theme node implicitly updated.
There's little reasons to use that API, so perhaps this is an acceptable
tradeoff.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/779

7 years agost: Drop StWidget theme overriding API
Carlos Garnacho [Tue, 5 Nov 2019 10:45:36 +0000 (11:45 +0100)]
st: Drop StWidget theme overriding API

A StWidget could get its style from a) a theme set in the StThemeContext,
and b) directly through it's ::theme property. Generally, overriding CSS
through the latter cannot be recommended as it loses any connection with
the global theme (eg. the ones you get through selector specificity).

It sounds a bit too powerful and pervasive, there's no use for it in
gnome-shell and doesn't look like something that could be recommended on
extensions. So, just drop this piece of API.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/779

7 years agocalendar-server: Uses wrong timezone for event times
Milan Crha [Tue, 5 Nov 2019 11:07:40 +0000 (12:07 +0100)]
calendar-server: Uses wrong timezone for event times

The conversion to UTC/time_t time was not using correct timezone.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1714
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/806

7 years agocleanup: Use more template strings
Florian Müllner [Tue, 29 Oct 2019 18:21:21 +0000 (19:21 +0100)]
cleanup: Use more template strings

xgettext got better at recognizing template strings, so we can
replace more string concatenations. Alas xgettext is still buggy
(surprise, regular expressions are hard), so there are still a
handful of holdouts that prevent us from making a complete switch.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agost: Remove StBin's align properties
Florian Müllner [Thu, 17 Oct 2019 21:27:27 +0000 (23:27 +0200)]
st: Remove StBin's align properties

They are now completely unused, so remove them and stop the confusing
shadowing of ClutterActor's own x/y-align properties.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agojs: Use generic actor properties to align StBin children
Florian Müllner [Thu, 17 Oct 2019 21:40:24 +0000 (23:40 +0200)]
js: Use generic actor properties to align StBin children

StBin's fill/align properties are now no-ops; get back the intended
child allocation by setting the corresponding x/y-align on the child.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost: Remove st_get_align_factor() utility method
Florian Müllner [Thu, 17 Oct 2019 21:29:06 +0000 (23:29 +0200)]
st: Remove st_get_align_factor() utility method

It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost/bin: Use child's align properties
Florian Müllner [Thu, 17 Oct 2019 21:27:27 +0000 (23:27 +0200)]
st/bin: Use child's align properties

By now, all containers and layout managers except StBin (and its
subclasses) use the generic ClutterActor expand/align properties
to control how their children are laid out.

This is particularly confusing as two or the properties StBin uses
for layout - x-align and y-align - shadow the generic ClutterActor
ones, but work very differently: They use a different enum and
determine how the bin lays out its child, instead of how the bin
is laid out by its parent.

Address this by deprecating the StBin properties and using the same
generic ClutterActor properties as everyone else.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost: Deprecate StBoxLayout child properties
Florian Müllner [Wed, 23 Oct 2019 13:15:42 +0000 (15:15 +0200)]
st: Deprecate StBoxLayout child properties

We are no longer using them, and so shouldn't anyone else :-)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780

7 years agojs: Replace child properties
Florian Müllner [Mon, 21 Oct 2019 18:44:00 +0000 (20:44 +0200)]
js: Replace child properties

Every since commit aa394754, StBoxLayout has supported ClutterActor's
expand/align properties in addition to the container-specific child
properties. Given that that's the only container left with a special
child meta, it's time to fully embrace the generic properties (and
eventually remove the child meta).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780

7 years agopadOsd: Add missing 'closed' signal
Carlos Garnacho [Fri, 1 Nov 2019 19:01:31 +0000 (20:01 +0100)]
padOsd: Add missing 'closed' signal

This wasn't added on the GObject-ification in commit c4c5c4fd5c. This
introduced warnings and misbehaviors when closing the dialog. (Eg.
pressing the "show OSD" pad action would show stack different dialogs
on top each other).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/800

7 years agolayout: Drop no-clear-hint code
Carlos Garnacho [Fri, 1 Nov 2019 11:21:19 +0000 (12:21 +0100)]
layout: Drop no-clear-hint code

Mutter is doing the right thing by default, we no longer need this.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/798

7 years agoappDisplay: Check instanceof AppIcon using constructor inside the class
Jonas Dreßler [Tue, 29 Oct 2019 22:47:55 +0000 (23:47 +0100)]
appDisplay: Check instanceof AppIcon using constructor inside the class

It seems like some recent change (maybe the move to a ClutterActor
subclass for AppIcon) broke the check whether the drag source is an
instance of AppIcon. While the drag source indeed is an AppIcon and
everything else works correctly, the check still returns false, which
breaks the creation of new folders using DnD.

Theoretically it makes sense that this doesn't work, because we're
assigning AppIcon using `var AppIcon =` and that will only get set after
`GObject.register_class()` finished, so accessing `AppIcon` inside that
function seems risky and is probably wrong.

Fix this by comparing to `this.constructor` instead of `AppIcon`, which
works fine and we know for sure exists at this point.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/794

7 years agopo: Sort LINGUAS
Will Thompson [Thu, 31 Oct 2019 09:42:10 +0000 (09:42 +0000)]
po: Sort LINGUAS

In Endless, we add support for a number of additional languages. Keeping
this file sorted makes it easier to rebase the patch which does this. No
functional change.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/797

7 years agocleanup: Use (un)block_signal_handler() convenience wrapper
Florian Müllner [Wed, 30 Oct 2019 17:11:56 +0000 (18:11 +0100)]
cleanup: Use (un)block_signal_handler() convenience wrapper

We now depend on a gjs version that is guaranteed to provide those
more idiomatic wrappers, so use them instead of the clunkier static
methods.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/795

7 years agoci: Run tests through dbus-run-session
Florian Müllner [Wed, 30 Oct 2019 18:15:26 +0000 (19:15 +0100)]
ci: Run tests through dbus-run-session

Something changed recently in the test initialization code, causing
the test-theme invocation to fail. Make sure there is a D-Bus session
by running the tests through dbus-run-session to get them going again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/796

7 years agost/scroll-view: Remove scrollbars references on dispose
Marco Trevisan (Treviño) [Fri, 3 Aug 2018 17:06:47 +0000 (19:06 +0200)]
st/scroll-view: Remove scrollbars references on dispose

As we're destroying the scrollbars on destruction, we should remove any
reference of it, not to cause multiple-calls to disposal to unreference them
again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/190

7 years agompris: Hide notification when !CanPlay, instead of closing player
Philip Chimento [Tue, 29 Oct 2019 00:11:40 +0000 (17:11 -0700)]
mpris: Hide notification when !CanPlay, instead of closing player

I have observed a client in the wild (Chromium again) set CanPlay to
false momentarily while it is loading the next song. Previously, the
code would close the player proxy in that case, meaning that after
playing one track, the MPRIS message would disappear and never come
back.

However, I think this use of CanPlay, while apparently not usual, is not
incorrect according to the spec. We should hide the message instead of
closing the player proxy.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1362

7 years agompris: Validate received data against the expected types from the spec
Philip Chimento [Tue, 29 Oct 2019 00:06:40 +0000 (17:06 -0700)]
mpris: Validate received data against the expected types from the spec

In the wild we have buggy clients (notably Chromium 77 and earlier) that
send metadata with the wrong types. Previously, this would throw an
exception and prevent the MPRIS information from showing up in the
message list.

This changes the code to check if any incoming metadata is of the type
it is expected to be, and logs a warning if not, then continues on with
a default value.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1362

7 years agojs: Use Gjs GTypeName computation for all classes
Marco Trevisan (Treviño) [Mon, 28 Oct 2019 18:35:33 +0000 (19:35 +0100)]
js: Use Gjs GTypeName computation for all classes

As per previous commit we can remove the explicit GTypeName definitions
and use gjs auto computation for all the GObject registered classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/790

7 years agoenvironment: Use gjs smart GObject GTypeName computation
Marco Trevisan (Treviño) [Mon, 28 Oct 2019 17:44:24 +0000 (18:44 +0100)]
environment: Use gjs smart GObject GTypeName computation

Make gjs to compute the GType name for registered GObject-derived
classes using the file basename and the first directory name, so that we
can avoid name clashing, and ensure that no extension will break the
shell by registering a name that is already used (by the shell or by any
other extension).

This requires gjs commit 02568304 [1] that will be part of release 3.35.2,
so bump the required version as gjs does post-release version bumps.

[1] https://gitlab.gnome.org/GNOME/gjs/merge_requests/337

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/790

7 years agoci: Switch to mutter's v3 docker image
Florian Müllner [Tue, 29 Oct 2019 01:09:46 +0000 (02:09 +0100)]
ci: Switch to mutter's v3 docker image

As we start depending on newer stuff, switch to an image that is based
on a more recent base image to minimize the pain a bit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agopadOsd: Work around xgettext confusion
Florian Müllner [Tue, 29 Oct 2019 13:13:38 +0000 (14:13 +0100)]
padOsd: Work around xgettext confusion

Similar to the previous work-around, xgettext gets thrown off by
embedded quotes in template strings, in particular where a template
"breaks up" a pair of quotes.

Throw in some more comments to make xgettext happy, but whoever makes
the gettext toolchain not depend on fragile regular expressions will
be drowned in beverages of their choice ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agoextensionPrefs: Trick xgettext into accepting odd number of backticks
Florian Müllner [Tue, 29 Oct 2019 13:01:07 +0000 (14:01 +0100)]
extensionPrefs: Trick xgettext into accepting odd number of backticks

Xgettext learned about template strings now, which is good. However
it's still buggy, so instead of the "classic" xgettext issue with
backticks, we now have exciting new issues to find work-arounds for.

One issue is that it doesn't detect backticks inside string constants
as regular characters, so having an odd number of backticks throws off
its regex.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agooverview: Set searchEntry offscreen-redirected always
Daniel van Vugt [Wed, 23 Oct 2019 04:18:20 +0000 (12:18 +0800)]
overview: Set searchEntry offscreen-redirected always

This corrects weird-looking blending visible as it fades out when the
overview closes. Previously the entry's dark background would drown out
the text as it fades out, but now they maintain a consistent contrast ratio
during the fade.

There's no noticeable change in performance, but in theory it should be
faster as text entries don't change at full frame rate. So stage redraws
will usually have a cached searchEntry drawn and require less effort.
Though the main purpose here is to correct the appearance.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/778

7 years agocloseDialog: Fix dialog size when using geometry scaling
Jonas Dreßler [Tue, 15 Oct 2019 14:20:09 +0000 (16:20 +0200)]
closeDialog: Fix dialog size when using geometry scaling

The close dialog is added as a child to MetaWindowActor, and, in Wayland
sessions, since commit [1] MetaWindowActor applies a transformation
matrix which scales all it's children using the geometry scale factor.
Now because the dialog actor is not a window (i.e. a MetaSurfaceActor),
but a subclass of StWidget, the scale factor is also applied to the
properties of the dialog by StThemeNode, so we end up applying the
geometry scale twice to the close dialog.

Fix this by applying the inverted scale to the dialog, which leaves the
scaling only to MetaWindowActor. This means we also can't apply a pivot
point other than 0 to the dialog actor, so apply the 0.5-pivot point to
the `_dialog` child of the Dialog class (the actual visible dialog box)
and also perform scaling animations on this child.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/fb9e8768

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/783

7 years agowindowManager: Always reset window actors when animations are cancelled
Jonas Dreßler [Sat, 26 Oct 2019 07:40:40 +0000 (09:40 +0200)]
windowManager: Always reset window actors when animations are cancelled

Remove all transformations from window actors after a window animation
was either cancelled or finished. Right now we only do that if the
transition finished successfully, which seems kind of pointless (it can
probably be historically explained because the callbacks inside the
"kill-window-effects" signal handler are connected to those
`*WindowDone()` functions though and the `*WindowOverwritten()`
functions were only added later in [1]).

This fixes a recent regression where a window animation would get
cancelled and remain stuck by switching workspaces. The regression
probably happened due to different behaviour of the `onOverwritten`
callback of Tweener and the `onStopped` callback of Clutter transitions:
For the workspace-switching animation the window actors get reparented
to a temporary container, which makes Clutter transititons emit
"stopped" (`clutter_actor_remove_child_internal()` stops transitions on
its children), while Tweener would continue the animation.

[1] https://gitlab.gnome.org/GNOME/gnome-shell/commits/6dd302e5ce187d6db9266a7d6c0b94fd37fa46f4

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/784

7 years agopopupMenu: Don't chain up vfuncs if the parent doesn't implement them
Jonas Dreßler [Sun, 27 Oct 2019 21:28:38 +0000 (22:28 +0100)]
popupMenu: Don't chain up vfuncs if the parent doesn't implement them

Some vfuncs like `button_press_event`, `button_release_event` and
`touch_event` don't have handlers in the parent classes of
PopupBaseMenuItem. So don't call those handlers and return the default
Clutter.EVENT_PROPAGATE there.

This fixes a crash of the shell that happens when pressing a mouse
button inside the system popup menu and releasing it above a slider like
the volume slider again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/787

7 years agopanel: Update window section items on title changes
Florian Müllner [Mon, 28 Oct 2019 11:32:31 +0000 (12:32 +0100)]
panel: Update window section items on title changes

We currently only update the windows section when either the focus app changes,
or when the app's windows change (that is, a window is opened or closed). This
allows the menu item labels to become stale if the window title changes after
one of those events (for example when switching tabs).

Fix this by updating menu items when the corresponding window title changes.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1830

7 years agoappDisplay: Don't crash if app is missing categories
Philip Chimento [Fri, 25 Oct 2019 22:27:25 +0000 (15:27 -0700)]
appDisplay: Don't crash if app is missing categories

g_desktop_app_info_get_categories() may return null. In that case, the
previous code would fail to create a folder when dragging an app with
no categories onto another app. Instead, simply continue with the next
app info.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/782

7 years agodnd: Skip drag target when its acceptDrop() throws an exception
Philip Chimento [Wed, 23 Oct 2019 00:48:00 +0000 (17:48 -0700)]
dnd: Skip drag target when its acceptDrop() throws an exception

In the case of bugs in a drag target's acceptDrop() function, it may
throw an exception. In the previous code, this would break out of the
loop entirely and never cancel the drag, so the mouse button release
event would be ignored and you would have to press Esc to get out of the
drag.

In this change, if acceptDrop() throws an exception, we log it and move
on to the next parent target instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/777

7 years agojs: Replace Clutter.Actor.get_allocation_geometry()
Florian Müllner [Mon, 21 Oct 2019 15:42:12 +0000 (17:42 +0200)]
js: Replace Clutter.Actor.get_allocation_geometry()

The function was deprecated and has now been dropped from mutter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/776

7 years agost: Use clutter_actor_pick() in pick
Georges Basile Stavracas Neto [Thu, 17 Oct 2019 14:59:13 +0000 (16:59 +0200)]
st: Use clutter_actor_pick() in pick

Use the new function to perform picking and avoid
going through any painting-related code paths.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/773

7 years agoUpdate Persian translation
Danial Behzadi [Sat, 19 Oct 2019 15:16:39 +0000 (15:16 +0000)]
Update Persian translation

7 years agoUpdate shotwell desktop file name references
Kalev Lember [Fri, 18 Oct 2019 13:28:26 +0000 (15:28 +0200)]
Update shotwell desktop file name references

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/774

7 years agoauthPrompt: Wiggle on failure
Georges Basile Stavracas Neto [Tue, 15 Oct 2019 19:34:35 +0000 (21:34 +0200)]
authPrompt: Wiggle on failure

Add a wiggle effect to the password entry on failure. The
parameters are set as per design review during GNOME Shell
Hackfest 2019.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/768

7 years agoutil: Add wiggle helper
Georges Basile Stavracas Neto [Thu, 17 Oct 2019 10:26:04 +0000 (12:26 +0200)]
util: Add wiggle helper

Add Util.wiggle(), which accepts the wiggle offset, duration,
and number of times, as parameters.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/768

7 years agoenvironment: Parse repeat-count and auto-reverse
Georges Basile Stavracas Neto [Tue, 15 Oct 2019 19:32:21 +0000 (21:32 +0200)]
environment: Parse repeat-count and auto-reverse

Those are two useful ClutterTimeline properties and
will be needed for wiggling the search entry when
failing the password.

Add support for passing repeat-count and auto-reverse
to ClutterActor.ease and ClutterActor.ease_property.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/768

7 years agosearch: Drop SearchResultInterface again
Florian Müllner [Thu, 17 Oct 2019 12:27:10 +0000 (14:27 +0200)]
search: Drop SearchResultInterface again

It adds a significant cost to AppIcons which are used
 - quite a log (depending on installed apps)
 - in preformance-sensitive contexts (spring animation)

Just rely on duck typing and revert 91a5133116.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1799

7 years agoUpdate Friulian translation
Fabio Tomat [Thu, 17 Oct 2019 13:54:18 +0000 (13:54 +0000)]
Update Friulian translation

7 years agoUpdate Croatian translation
Goran Vidović [Thu, 17 Oct 2019 12:08:58 +0000 (12:08 +0000)]
Update Croatian translation

7 years agoworkspace: Use graphene instead of clutter
Robert Mader [Thu, 17 Oct 2019 09:22:30 +0000 (11:22 +0200)]
workspace: Use graphene instead of clutter

This was forgotten after the graphene type port landed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/770

7 years agoworkspace: Sort windows in overview grid using cached center
Andrew Watson [Tue, 15 Oct 2019 11:35:18 +0000 (12:35 +0100)]
workspace: Sort windows in overview grid using cached center

When accessing properties on ClutterActor for size and position there is
a notable access time overhead. This overhead adds considerable user lag
when opening the overview if many windows are open.

This is primarily due to these properties being accessed while sorting
WindowClone instances by their window's center for placement in the
overview. By pre-computing this center value only once when
initializing WindowClone, the induced lag can be significantly reduced.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/763

7 years agoci: Make run-eslint more convenient for local use
Florian Müllner [Sat, 14 Sep 2019 15:09:04 +0000 (17:09 +0200)]
ci: Make run-eslint more convenient for local use

The script can be helpful outside of CI, in particular for gradually
transitioning to the new style.

Reverting commit f00201fa6ca it is already possible to do something
like

 $ CI_MERGE_REQUEST_PROJECT_URL=https://gitlab.gnome.org/GNOME/gnome-shell \
   CI_MERGE_REQUEST_TARGET_BRANCH_NAME=master CI_COMMIT_SHA=HEAD \
   .gitlab-ci/run-eslint.sh

but that is hardly convenient.

Instead, allow passing the required parameters on the command line:

 $ .gitlab-ci/run-eslint.sh origin master

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/730

7 years agoci: Ensure eslint output exists
Florian Müllner [Wed, 14 Aug 2019 11:14:23 +0000 (13:14 +0200)]
ci: Ensure eslint output exists

We are a long time away from an error-free eslint run,
but when we get there eventually, let's not trip over
non-existent files ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/730

7 years agocleanup: Replace signal connections with virtual functions
Marco Trevisan (Treviño) [Tue, 10 Sep 2019 05:42:48 +0000 (07:42 +0200)]
cleanup: Replace signal connections with virtual functions

Inheriting from actors allows to use virtual functions instead of signal
connections for multiple cases, so just use them when possible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agost/button: Add the clicked button to virtual function signature
Marco Trevisan (Treviño) [Tue, 15 Oct 2019 19:13:59 +0000 (21:13 +0200)]
st/button: Add the clicked button to virtual function signature

clicked signal includes a clicked mouse button parameter, but the vfunc
signature doesn't include it, so it won't be passed to the functions when
the signal is emitted.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agopageIndicators: Use Clutter.Orientation as orientation parameter
Marco Trevisan (Treviño) [Tue, 10 Sep 2019 05:36:58 +0000 (07:36 +0200)]
pageIndicators: Use Clutter.Orientation as orientation parameter

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agodocs: Update `actor` and `delegate_` paragraph in HACKING
Marco Trevisan (Treviño) [Tue, 28 May 2019 06:30:10 +0000 (08:30 +0200)]
docs: Update `actor` and `delegate_` paragraph in HACKING

Deprecate the usage of the `actor` property, while keep the `_delegate` part
as it is needed for DnD for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agooverview: Make public properties read-only
Marco Trevisan (Treviño) [Sat, 31 Aug 2019 02:04:34 +0000 (04:04 +0200)]
overview: Make public properties read-only

Overview's animationInProgress, visible and visibleTarget properties are not
meant to be modified from others, but be read only.

So make this clearer using properties getters and private values.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoavatar: Use Property bindings to sync reactivity
Marco Trevisan (Treviño) [Fri, 30 Aug 2019 23:32:03 +0000 (01:32 +0200)]
avatar: Use Property bindings to sync reactivity

Instead of manually updating properties on change, use native properties
bindings to keep the them synchronized.

Disable hover-tracking and focus-ability when the avatar is not sensitive.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agowindowManager: Inherit WindowDimmer from Clutter.BrightnessContrastEffect
Marco Trevisan (Treviño) [Wed, 28 Aug 2019 19:56:53 +0000 (21:56 +0200)]
windowManager: Inherit WindowDimmer from Clutter.BrightnessContrastEffect

As result add the effect to the actor on the caller function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agocalendarMessageList: Remove sections map and use clutter children
Marco Trevisan (Treviño) [Sat, 31 Aug 2019 18:41:16 +0000 (20:41 +0200)]
calendarMessageList: Remove sections map and use clutter children

Now that the calendar message list and the message sections are actors, there's
no need to keep track of the sections in a different Map as we can just use the
native clutter functions to manage the children and access to their properties.

Also cleanup the signal connection/disconnection.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agomessageList: Use St.Bin as message container and use clutter to manage the list
Marco Trevisan (Treviño) [Mon, 13 May 2019 18:02:26 +0000 (20:02 +0200)]
messageList: Use St.Bin as message container and use clutter to manage the list

When messages are added to the message list, we create a container for those,
however since now the messages are actor themselves we can just create a list
item actor that holds the message actor and refer to the message parent in order
to get their container.

This allows to remove the obj container map we used, using the native clutter
parent-child hierarchy and handle signal connections cleanly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agolookingGlass: Use resultsArea to keep track of results
Marco Trevisan (Treviño) [Mon, 20 May 2019 21:25:14 +0000 (23:25 +0200)]
lookingGlass: Use resultsArea to keep track of results

Now that results are actors we can just use their container to keep
track of them

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agosearch: Define SearchResultInterface and implement valid results with it
Marco Trevisan (Treviño) [Wed, 16 Oct 2019 10:38:48 +0000 (12:38 +0200)]
search: Define SearchResultInterface and implement valid results with it

Since all the search result classes are now GObject classes, we can enforce
the methods we want to have in there (just activate() for now) using an
interface, to make sure they are implementing what we require and to easily
group all the classes that can be used as search results, even though they
are not extending SearchResult.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agocleanup: Use inheritance for Actor classes instead of composition
Marco Trevisan (Treviño) [Tue, 16 Jul 2019 09:24:13 +0000 (11:24 +0200)]
cleanup: Use inheritance for Actor classes instead of composition

Remove the `this.actor = ...` and `this.actor._delegate = this` patterns in most
of classes, by inheriting all the actor container classes.

Uses interfaces when needed for making sure that multiple classes will implement
some required methods or to avoid redefining the same code multiple times.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoscreenshot: Pass a Graphene.Point as PickPixel 'finished' signal
Marco Trevisan (Treviño) [Mon, 2 Sep 2019 23:51:00 +0000 (01:51 +0200)]
screenshot: Pass a Graphene.Point as PickPixel 'finished' signal

This will allow to pass the data as native object when porting this to Clutter
actor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoscreenshot: Return a Meta.Rectangle as geometry
Marco Trevisan (Treviño) [Sat, 13 Jul 2019 00:17:20 +0000 (02:17 +0200)]
screenshot: Return a Meta.Rectangle as geometry

Since the geometry is used as a signal parameter, this can't be used when using
a GObject based class, so use the Meta boxed type instead of a JS object.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agooverview: Add OverviewActor and use as main actor of the Overlay
Marco Trevisan (Treviño) [Sat, 31 Aug 2019 01:51:02 +0000 (03:51 +0200)]
overview: Add OverviewActor and use as main actor of the Overlay

Use the Overview class as controller, while create the actual overlay actor
using a GObject-derived class.

Replace actual properties with getter-only properties.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agomessageTray: Dispose Source on destruction
Marco Trevisan (Treviño) [Tue, 14 May 2019 02:03:51 +0000 (04:03 +0200)]
messageTray: Dispose Source on destruction

Dispose the Source Object when dispose() is called, avoiding that it could be
called twice on a destroyed Source.

So, notify count changes before destroying the object, and don't emit this
twice on destroyNonResidentNotifications (as if a notification is destroyed
the property notify will happen in the notification destroy callback anyways).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agomessageTray: Dispose Notification on destroy
Marco Trevisan (Treviño) [Tue, 14 May 2019 01:58:58 +0000 (03:58 +0200)]
messageTray: Dispose Notification on destroy

When the notification is destroyed we should also dispose the underneath GLib
object, and ensure that we don't dispose this twice.

In order to avoid this, don't destroy transient notifications that have been
already been removed and only destroy the resident notifications on activation
if they have not been destroyed earlier.
Thus connect after to the 'activated' signal and once the default handler has
been called destroy the notification if not requested earlier.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agomessageTray: Inherit Notification, Source and NotificationPolicy from GObject
Marco Trevisan (Treviño) [Mon, 13 May 2019 21:32:31 +0000 (23:32 +0200)]
messageTray: Inherit Notification, Source and NotificationPolicy from GObject

Register notifications, sources and policies as GObject gtypes so that they can
be passed in signals and use native properties and signals.

Reimplement all the extending classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agokeyboard: Add KeyboardManager to manage the lifetime of the keyboard actor
Marco Trevisan (Treviño) [Wed, 28 Aug 2019 21:52:52 +0000 (23:52 +0200)]
keyboard: Add KeyboardManager to manage the lifetime of the keyboard actor

The Keyboard class used to be both a view and controller class, however in order
to make the keyboard a native Clutter.Actor, we need to separate the widget from
the controller class, so that we can manage the actor lifetime from the JS side.

Thus, initialize the keyboard actor on the Keyboard constructor and create a
KeyboardManager class to manage its state and lifetime.

Add proxy methods for the public functions that were used by other shell
components

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agobackground: Rename Background 'changed' signal to 'bg-changed'
Marco Trevisan (Treviño) [Fri, 12 Jul 2019 22:56:12 +0000 (01:56 +0300)]
background: Rename Background 'changed' signal to 'bg-changed'

Meta.Background has already a 'changed' signal and not to confuse the source
signal with the wrapper one, rename the wrapper class signal into 'bg-changed'.

This will be relevant when we'll inherit from Meta.Background, as signal
emissions from the base class could interfere with the wanted derived class
behavior and with the the grouping of successive changes into a single ::change
emission.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agocalendar: Use GDateTime for selected-date-changed signal
Marco Trevisan (Treviño) [Mon, 2 Sep 2019 19:18:54 +0000 (21:18 +0200)]
calendar: Use GDateTime for selected-date-changed signal

Since GObject derived classes can't use JS objects as signal parameters, let's
go native and use GLib.DateTime instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoappDisplay: Use an St.Widget as base actor for FolderView
Marco Trevisan (Treviño) [Sat, 31 Aug 2019 03:21:10 +0000 (05:21 +0200)]
appDisplay: Use an St.Widget as base actor for FolderView

This is needed to make possible to convert BaseAppView into a St.Widget so that
all views can inherit from it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoanimation: Don't sync animation sizes on change
Marco Trevisan (Treviño) [Fri, 14 Jun 2019 14:44:19 +0000 (17:44 +0300)]
animation: Don't sync animation sizes on change

When the actor size changes, we might incur into an allocation cycle.

This was introduced by commit b6ec02ce, but when the animation will be an actor
itself, there will be no need to update the children size on actor size update,
as this will be managed by the actor allocation cycle itself.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1384
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agocleanup: Rename signals/methods that will conflict with Clutter.Actor
Marco Trevisan (Treviño) [Wed, 28 Aug 2019 20:06:14 +0000 (23:06 +0300)]
cleanup: Rename signals/methods that will conflict with Clutter.Actor

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559

7 years agoscreenShield: Compute lock timeout fade duration using animation settings
Marco Trevisan (Treviño) [Fri, 4 Oct 2019 09:04:43 +0000 (11:04 +0200)]
screenShield: Compute lock timeout fade duration using animation settings

When the screen is marked as idle, we normally start a fading animation and
a timeout to finally lock the screen. This timeout is configured using the
fade time if no longer delay is set in settings.

However if animations are disabled or slowed-down/up, the fade time is
different from the STANDARD_FADE_TIME and so we might end up showing the
lock shield without actually locking for STANDARD_FADE_TIME in the disabled
or slowed-up animations case, or locking too early in case of slowed-down
animations.

So, just adjust the timeout time using the same logic of animations so that
this value is matching all the times.

Related to https://gitlab.gnome.org/GNOME/gnome-shell/issues/1744

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/749

7 years agovolume: Show indicator when microphone is active
Florian Müllner [Sat, 14 Sep 2019 12:41:08 +0000 (14:41 +0200)]
volume: Show indicator when microphone is active

Devices like cameras and microphones are privacy sensitive, as they can
be used to spy on the user. We cannot prevent non-sandboxed apps from
doing that, but as we already track when the microphone is recording,
we can at least show an indicator to make sure it doesn't happen behind
the user's back.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/729

7 years agost: Remove color from ClutterActor pick virtual function
Daniel van Vugt [Mon, 14 Oct 2019 07:20:49 +0000 (15:20 +0800)]
st: Remove color from ClutterActor pick virtual function

It's unused since commit mutter@14c706e51

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/759

7 years agoReplace Clutter.Point by Graphene.Point
Georges Basile Stavracas Neto [Wed, 20 Feb 2019 19:54:29 +0000 (16:54 -0300)]
Replace Clutter.Point by Graphene.Point

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/421

7 years agost: Replace ClutterSize by graphene_size_t
Georges Basile Stavracas Neto [Wed, 20 Feb 2019 13:33:42 +0000 (10:33 -0300)]
st: Replace ClutterSize by graphene_size_t

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/421

7 years agoReplace ClutterVertex by graphene_point3d_t
Georges Basile Stavracas Neto [Wed, 20 Feb 2019 13:01:07 +0000 (10:01 -0300)]
Replace ClutterVertex by graphene_point3d_t

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/421

7 years agodoap: Clean up list of maintainers
Florian Müllner [Wed, 16 Oct 2019 10:23:37 +0000 (12:23 +0200)]
doap: Clean up list of maintainers

Move historic entries from "maintainers" to "authors" to reflect
current reality :-(

7 years agosearch: Activate SearchResult from the result itself
Marco Trevisan (Treviño) [Wed, 16 Oct 2019 00:23:22 +0000 (02:23 +0200)]
search: Activate SearchResult from the result itself

Search result views can include also objects that are not inheriting from
SearchResults (such as the AppIcon) that has not any 'activate' signal, to
connect to. Since we want to enforce a more formal interface, we want to
have just a simpler requirement as an activate() method.

So, instead using the 'activate' signal in SearchResult to activate a result
via SearchResultsBase just implement activate() in the result.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/765

7 years agosearch: Rename SearchResults to SearchResultsView
Marco Trevisan (Treviño) [Wed, 16 Oct 2019 09:31:44 +0000 (11:31 +0200)]
search: Rename SearchResults to SearchResultsView

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/765

7 years agoshell-screenshots: Do not pass a clip for window screenshots
Robert Mader [Mon, 14 Oct 2019 15:13:11 +0000 (17:13 +0200)]
shell-screenshots: Do not pass a clip for window screenshots

Design team wants us not to clip away the shadows, lets do that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/762

7 years agost/scroll-view: Remove container foreach vfunc
Marco Trevisan (Treviño) [Wed, 2 Oct 2019 20:41:04 +0000 (22:41 +0200)]
st/scroll-view: Remove container foreach vfunc

foreach_with_internals vfunc is deprecated for long time and not used
anymore, so remove it

Related to: https://gitlab.gnome.org/GNOME/mutter/merge_requests/816

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/747